using System.ComponentModel.DataAnnotations;
 using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class E1VoteMap : EntityTypeConfiguration<E1Vote>
    {
        public E1VoteMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Guest_ip)
                .IsRequired()
                .HasMaxLength(30);

            // Table & Column Mappings
            this.ToTable("E1Vote");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.User_id).HasColumnName("User_id");
            this.Property(t => t.Guest_ip).HasColumnName("Guest_ip");
            this.Property(t => t.AgeGroup).HasColumnName("AgeGroup");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
        }
    }
}
